exports.getRecycleDocumentInfo = function(req,res){

    var restfulParams = req.routeInfo.restfulParams;

    var resultData = {};


    //获取文档信息
    function searchDocument(cb){

        console.log(CORE_APIConfig.coreAPI.cmsArticleSearch.Request_Api_Url + "/skip/"+restfulParams.skip+"/limit/"+restfulParams.limit+"/ca_is_delete/1/count/1");

        R.SEND_HTTP(
            req,
            res,
            {
                url    : CORE_APIConfig.coreAPI.cmsArticleSearch.Request_Api_Url + "/skip/"+restfulParams.skip+"/limit/"+restfulParams.limit+"/ca_is_delete/1/count/1",
                method : 'GET'
            },
            function (data) {

                resultData.documentData  = data.result.data;
                resultData.documentCount = data.result.count;

                cb();

            }
        )
    }

    //查询文档所属栏目名称和发布人昵称
    function searchColumnAndNickname(cb){

        F.SerialEach(resultData.documentData,function(item,index,callback){

            //查询栏目名
            function searchColumnName(eachCb){

                R.SEND_HTTP(
                    req,
                    res,
                    {
                        url    : CORE_APIConfig.coreAPI.cmsColumnSearch.Request_Api_Url + "/cc_id/" + item.ca_ccid,
                        method : 'POST',
                        data   : {
                            fields : 'cc_name'
                        }
                    },
                    function (data) {

                        item.cc_name = data.result.data[0].cc_name

                        eachCb();

                    }
                )
            }

            //查询发布人昵称
            function searchUserNickname(eachCb){
                R.SEND_HTTP(
                    req,
                    res,
                    {
                        url    : CORE_APIConfig.coreAPI.userSearch.Request_Api_Url + "/u_id/" + item.ca_uid,
                        method : 'POST',
                        data   : {
                            fields : 'u_nickname'
                        }
                    },
                    function (data) {

                        item.u_nickname = data.result.data[0].u_nickname

                        eachCb();

                    }
                )

            }

            F.Parallel([
                searchColumnName,
                searchUserNickname
            ],() => {
                callback();
            })

        },cb)

    }

    F.Serial([
        searchDocument,
        searchColumnAndNickname
    ],() => {
        RES.successResponse(res,resultData);
    })

}